﻿using System.IO;
using System.Xml.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using XSerialization.Generator;

namespace XSerializer.UnitTests
{
    /// <summary/>
    [TestClass()]
    public class XGeneratorTest
    {
        /// <summary/>
        [TestMethod()]
        [Ignore]
        public void GenerateSampleCode()
        {
            // arrange
            XDocument xsdDocument = XDocument.Load(new MemoryStream(Properties.Resources.LibraryXsd));
            IFileMetaInfo interfaceInfo = new FileMetaInfo("ILibrary.cs", @"C:\", "XSerializer.UnitTests.Sample", "");
            IFileMetaInfo codeInfo = new FileMetaInfo("Library.cs", @"C:\", "XSerializer.UnitTests.Sample", "BaseClass");

            IXGenerator xGenerator = new XGenerator();
            xGenerator.AddFile(xsdDocument, interfaceInfo, codeInfo);
            xGenerator.Start();
            xGenerator.Save();
        }
    }
}
